package com.gome.axwl.aoc.web.controller.mq.consumer;

import java.io.File;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.gome.axwl.aoc.common.util.XskyS3Util;
import com.gome.axwl.aoc.entity.po.CsApplyInfoPo;
import com.gome.axwl.aoc.service.CsApplyinfoService;
import com.gome.axwl.aoc.web.util.ZipUtil;
import com.gome.commons.core.ResultData;

@Component
public class ZipAttachmentConsumer extends AbstractConsumer<Integer> {

    @Autowired
    private CsApplyinfoService csApplyinfoService;
    @Override
    public ResultData<?> processBusinessLogic(Integer applyInfoId) {
        CsApplyInfoPo applyInfo = csApplyinfoService.queryById(applyInfoId);
        String name = applyInfo.getCarrrierSettleName();
        List<File> files = null;//FileUtil.download("", "/tmp", "");
        File file = ZipUtil.getZipFile(files, name + ".zip");
        XskyS3Util.uploadAndReturnUrl(null, file, name + ".zip");
        return null;
    }

}
